package web.gkw.action;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import web.gkw.model.General;
import web.gkw.service.GeneralService;

import com.opensymphony.xwork2.ActionSupport;

/**
 * @author Administrator
 *
 */

@Component
public class SenseDetail extends ActionSupport {
	private General sense;
	private int id;
	
	@Resource
	private GeneralService generalService;
	public GeneralService getGeneralService() {
		return generalService;
	}
	public void setGeneralService(GeneralService generalService) {
		this.generalService = generalService;
	}
	public General getSense() {
		return sense;
	}
	public void setSense(General sense) {
		this.sense = sense;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		sense = generalService.getGeneral(id);
		return "show";
	}
}
